import request from '@/utils/request'

export function getEmployeesSimple() {
  return request({
    url: '/sys/user/simple',
    method: 'get'
  })
}

/**
 *
 * @description: 获取员工列表
 * @param {*} params {page: 当前页， size: 每页条数}
 * @returns
 */

export function getEmployeesList(page, size) {
  return request({
    url: '/sys/user',
    method: 'get',
    params: { page, size }
  })
}

export function delEmployee(id) {
  return request({
    url: `/sys/user/${id}`,
    method: 'delete'
  })
}

export function addEmployee(data) {
  return request({
    url: `/sys/user`,
    method: 'post',
    data
  })
}
